clear all

*set working directory
use "repl_data.dta"


*establishing baseline level of conspiratorial belief within the treatment arm when no treatment was delivered
sum ct if treat1==0 & treat3==0 & purecontrol==0


*****************************************************
*pre-reg test of H1  (column 1, appendix p. 25)
*main effect model - predicting conspiracy belief as function of exposure conditions while ignoring question format
*****************************************************

mixed ct treat1 treat3 i.outcome if purecontrol==0, vce(cluster ID) || ID:
est store m1
test treat1=treat3


*****************************************************
*non-pre-reg test of H1 (column 2, appendix p. 25)
*main effect model - predicting conspiracy belief as function of exposure conditions while controlling for question format
*****************************************************

mixed ct treat1 treat3 ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:
est store m2
test treat1=treat3


******************************************************
*pre-reg test of H2 (column 3, appendix p. 25)
*interaction between exposure conditions and question format
******************************************************

mixed ct i.treat1##i.ECcond i.treat3##i.ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:
est store m3

*difference between effects of low and high levels of exposure in agree/disagree condition
test 1.treat1=1.treat3

*effect of low exposure in explicit choice condition
lincom 1.treat1+1.treat1#1.ECcond

*effect of high exposure in explicit choice condition
lincom 1.treat3+1.treat3#1.ECcond


*********************************************
*pre-reg test of H3 (column 4, appendix p. 25)
*interaction between exposure conditions and conspiratorial predispositions 
*********************************************

mixed ct i.treat1##c.ConspPre i.treat3##c.ConspPre i.outcome if purecontrol==0, vce(cluster ID) || ID:
est store m4


*full appendix table, p. 25
esttab m1 m2 m3 m4, keep(treat1 treat3 ECcond 1.ECcond 1.treat1 1.treat3 ConspPre 1.treat1#1.ECcond 1.treat3#1.ECcond 1.treat1#c.ConspPre 1.treat3#c.ConspPre) b(%9.3f) se compress


****************************************
*creating Figure 2 using model m3 above 
****************************************

mixed ct i.treat1##i.ECcond i.treat3##i.ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:
lincomest 1.treat1
est store t1ad
mixed ct i.treat1##i.ECcond i.treat3##i.ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:
lincomest 1.treat1+1.treat1#1.ECcond
est store t1fc
mixed ct i.treat1##i.ECcond i.treat3##i.ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:
lincomest 1.treat3
est store t3ad
mixed ct i.treat1##i.ECcond i.treat3##i.ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:
lincomest 1.treat3+1.treat3#1.ECcond
est store t3fc

coefplot t1ad t3ad t1fc t3fc, vert yline(0) legend(off) ylab(.09(.03)-.06) xlab(.7 `""Agree-Disagree" "Exposure=1""' .9 `""Agree-Disagree" "Exposure=3""' 1.1 `""Explicit Choice" "Exposure=1""'  1.3 `""Explicit Choice" "Exposure=3""', labsize(small)) ytitle("Change in Conspiracy Belief") xtitle("Experimental Condition") xsc(titlegap(2)) ysc(titlegap(2))



*****************************************************
* appendix p. 26, column 1
*predicting unsure response as a function of exposure treatments and interactions with question format
*****************************************************

mixed dk i.treat1##i.ECcond i.treat3##i.ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:

*effect of low exposure with explicit choice condition
lincom 1.treat1+1.treat1#1.ECcond

*effect of high exposure with explicit choice condition
lincom 1.treat3+1.treat3#1.ECcond


***************************************************
* appendix p. 26, column 2
*predicting rejection response as a function of exposure treatments and interactions with question format
***************************************************

mixed rj i.treat1##i.ECcond i.treat3##i.ECcond i.outcome if purecontrol==0, vce(cluster ID) || ID:

*effect of low exposure with explicit choice condition
lincom 1.treat1+1.treat1#1.ECcond

*effect of high exposure with explicit choice condition
lincom 1.treat3+1.treat3#1.ECcond
